<%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>借りたいもの予約画面 | ご近所シェアリングサービス</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="(C) MENOX (http://www.menox.co.jp/)">
<!--Require Stylesheet-->
<link rel="stylesheet" href="/tmserver/css/common.css">
<!--Require Javascript-->
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
<%@ include file="/tmserver/parts/headcommon.jsp" %>
</head>
<body onload="loadUserName()">
<div id="wrapper">
<!--**********▽メインここから**********-->
<div id="wrap-top">
<%@ include file="/tmserver/parts/header.jsp" %>
<div id="content">
<h2>借りたいもの予約画面</h2>
<div class="line"></div>
<!--**********▽カラム1ここから**********-->
<div id="column1">
<!--**********▼メインカラムここから**********-->
<div id="column1-inner">
    <%@ include file="/tmserver/gate/contents.jsp" %>
<!--column1-inner--></div>
<!--**********▲メインカラムここまで**********-->
<!--column1--></div>
<!--**********△カラム1ここまで**********-->

<jsp:useBean id="date" class="java.util.Date"/>


<div id="column2">
<p class="stitle">借りたいもの予約</p>
<form method="post" action="requestBorrowingReserve">
<table class="condition">
  <tr><th class="lend">カテゴリー</th>
    <td>${f:h(cateMap[lending.categoryId])}
    </td>
  </tr>
  <tr><th>個数</th>
    <td>${f:h(lending.count)}<input type="hidden" name="count" value="${lending.count}" />
<% /* TODOF: 今回は個数は選択不可
    <td>
      <select name="count">
        <c:forEach var="lendingCount" begin="1" end="${lending.count}">
        <option value="${lendingCount}"><c:out value="${lendingCount}"></c:out></option>
        </c:forEach>
      </select>
*/ %>
    </td>
  </tr>
  <tr><th>品物名</th><td>${f:h(lending.name)}</td></tr>
  <tr><th>貸与者</th><td>${f:h(userMap[lending.userId])}</td></tr>
  <tr><th>品物説明</th><td>${f:h(lending.comment)}</td></tr>
  <tr><th>貸出希望日</th>
    <td><input id="fromDate" type="text" ${f:text("fromDate")} class="${f:errorClass('fromDate','err')}" />（例：2014/01/01）
      <span class="err">${errors.fromDate}</span>
      <script type="text/javascript">
        $(function() { $("#fromDate").datepicker(); });
      </script>
    </td>
  </tr>
  <tr><th>返却予定日</th>
    <td><input id="toDate" type="text" ${f:text("toDate")} class="${f:errorClass('toDate','err')}" />（例：2014/01/01）
      <span class="err">${errors.toDate}</span>
      <script type="text/javascript">
        $(function() { $("#toDate").datepicker(); });
      </script>
    </td>
  </tr>

  <tr><td colspan="2" class="aligncenter"><input type="submit" value="予約" class="btn" />
      <input type="hidden" name="lendingId" value="${lending.id}" />
    </td>
  </tr>
</table>
</form>

<!--column2--></div>
<!--**********△カラム2ここまで**********-->
<!--content--></div>
<!--wrap-top--></div>
<!--**********△メインここまで**********-->
<%@ include file="/tmserver/parts/footer.jsp" %>
<!--wrapper--></div>
</body>
</html>
